<template>
  <div class="hezi">
    <div class="he" v-for="(item, index) in arr" :key="index" @click="$router.push(item.path)">
      <div class="zi">
        <div class="box">
          <img :src="item.img" alt />
        </div>
        <div>{{ item.name }}</div>
        <div class="ename">{{ item.ename }}</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["arr"],
  components: {},
};
</script>

<style lang="less" scoped>
.hezi {
  padding-top: 60px;
  width: 641px;
  margin: auto;
  display: flex;
  // justify-content: center;
  flex-wrap: wrap;
  text-align: center;
  font-size: 40px;
}
.he {
  width: 300px;
  height: 420px;
  margin: 0 10px 20px 10px;
  background-color: #fff;
  position: relative;
  .zi {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    div {
      width: 300px;
    }
    .ename {
      font-size: 15px;
      margin-top: 20px;
    }
    .box {
      height: 160px;
      position: relative;

      img {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
      }
    }
  }
  img {
    width: 100px;
  }
}
</style>